package com.summer.test.controller;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.summer.core.annotations.ScopeType;
import com.summer.core.controller.EntityHome;
import com.summer.core.service.BaseService;
import com.summer.core.util.FacesUtil;
import com.summer.test.model.OneBean;

@Component
@Scope(ScopeType.VIEW)
public class OneBeanHome extends EntityHome<OneBean> {

	@Resource
	BaseService<OneBean> baseService;
	
	@Override
	public String save() {
		
		baseService.save(getInstance());
		
		return FacesUtil.redirect("/admin/test/oneBeanList");
	}
}
